# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=eventviews
pkgver=20.04.3
pkgrel=0
pkgdesc="Library for creating events"
# ppc64le, s390x and armhf blocked by akonadi-calendar -> kmailtransport -> libkgapi -> qt5-qtwebengine
arch="all !ppc64le !s390x !armhf !mips !mips64"
url="https://kontact.kde.org/"
license="GPL-2.0-or-later"
depends_dev="qt5-qtbase-dev qt5-qttools-static akonadi-dev ki18n-dev kcodecs-dev kguiaddons-dev
	kiconthemes-dev kservice-dev kcompletion-dev kholidays-dev kdiagram-dev
	libkdepim-dev kcalutils-dev kcalendarcore-dev calendarsupport-dev
	akonadi-calendar-dev kmime-dev"
makedepends="$depends_dev extra-cmake-modules"
source="https://download.kde.org/stable/release-service/$pkgver/src/eventviews-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="c099f61c0c8cb1997cdf898b6147dea918066f8e04f155690e80bc93167ed4e851a5042af70ddee876ca9800f8b8af755cdf7a3c3e6d31a68df4189882b50124  eventviews-20.04.3.tar.xz"
